/**
 * @Name: HW_6-1.css
 * @Description: 計算機
 * @Author: 李瑞豪
 * @Update: 2019-09-23 16:45
 */

* {
  margin: 0;
  padding: 0;
  outline: 0;
}
html,body {
  height:100%;
  width: 100%;
  display: flex;
  justify-content: center;
}
main{
  width: 400px;
  height: 500px;
  background: #999;
  border-radius: 10px;
  box-shadow: 10px 10px 5px #666;
  display: flex;
  justify-content: center;
  margin: auto;
  position: relative;
}
.tip{
  color: #f00;
  border-radius: 5px;
  position: absolute;
  line-height: 20px;
  z-index: 1;
}
.history1,.history2{
  position: absolute;
  z-index: 1;
  display: inline-block;
  height: 20px;
  width: calc(100% - 70px);
  top: 30px;
  text-align: right;
  font-size: 1.2em;
  color: #aaa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
.history2{
  top: 50px;
}
table{
  border-spacing: 20px;
  height: 100%;
  position: relative;
}
td {
  height: 10%;
  width: 20%;
}
input{
  position: relative;
  display: inline-block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  font-size: 1.8rem;
  font-weight: bold;
  text-align: right;
  box-sizing: border-box;
  padding: 40px 10px 0;
}
button {
  border: none;
  display: inline-block;
  width: 100%;
  height: 100%;
  font-size: 1.8rem;
  font-weight: bold;
  border-radius: 5px;
  background: #fff;
  box-shadow: 5px 5px 5px #555;
}
button:hover{
  color: #333;
  background: #ddd;
}
button:active {
  transform: scale(0.95);
}
.calculate:hover{
  background: gold;
  color: #fff;
}
.clear:hover{
  background: green;
  color: #fff;
}
.del-char:hover{
  background: red;
  color: #fff;
}
